package com.jugheadzhou.aop.task;

import com.jugheadzhou.aop.annotation.TaskExceptionHandle;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class TestTask {

    @TaskExceptionHandle
    @Scheduled(fixedDelay = 1000 * 5)
    public void testSchedule(){
        log.info("测试任务开始执行");
        log.error("测试异常：{}", 1/0);
        log.info("测试任务结束执行");
    }

}
